Skip to content

[5.x] Return validation error when AllowedFile is not an UploadedFile #11535

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 5, 2025

Conversation

ryanmitchell
Copy link
Contributor

This PR updates the isAllowedExtension method in AllowedFile validation rule to handle a value that isn't an UploadedFile being passed to it.

I couldn't see where to put a test - happy to add one if you can point me in the right direction?

Closes #11525

@jasonvarga jasonvarga merged commit 8a12976 into statamic:5.x Mar 5, 2025
25 checks passed
@ryanmitchell ryanmitchell deleted the fix/issue-11525 branch March 5, 2025 21:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Frontend Form Request Validation for Assets responds with 500 instead of 422
2 participants